<template>
	<view class="">
		<image src="../../static/images/asd.png" style="width: 100%;height: 375upx;"></image>
		<view style="color: #ffaa00;font-weight: bold;font-size: 27upx;margin: 30upx;padding: 15upx;border-bottom: 1upx solid #808080;">
			提醒时间
		</view>
		<view v-for="items in dataList2" style="padding: 10upx;border-bottom: 1upx dashed #808080;display: flex;flex-direction: row;justify-content: space-between;margin: 20upx 30upx 20upx 30upx;font-size: 30upx;">
			<view class="" style="font-size: 23rpx;">
				{{items.bookName}}
			</view>
			<view class="" style="font-size: 23rpx; color: #808080;">
				归还:{{items.bookReamrk}}
			</view>
		</view>
		
		<view style="font-weight: bold;font-size: 27upx;margin: 30upx;padding: 15upx;border-bottom: 1upx solid #808080;">
			历史记录
		</view>
		<view v-for="items in dataList" style="padding: 10upx;border-bottom: 1upx dashed #808080;display: flex;flex-direction: row;justify-content: space-between;margin: 20upx 30upx 20upx 30upx;font-size: 30upx;">
			<view class="" style="font-size: 23rpx;">
				{{items.bookName}}
			</view>
			<view class="" style="font-size: 23rpx; color: #808080;">
				已还:{{items.bookReamrk}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				usersName: '',

				dataList: [],
				dataList2: []
				
			}
		},
		onLoad() {
			var a = uni.getStorageSync('usersName')
			this.usersName = a
			this.initQd()
		},
		methods: {
			initQd() {
				var _this = this
				var usersName = uni.getStorageSync('usersName')
				var usersId = uni.getStorageSync('usersId')
				uni.request({
					url: _this.serverUrl + "renren/bookborrow/list2",
					data:{
						userId:usersId,
						bookState:1,
					},
					success(res) {
						_this.dataList2 = res.data.page.list
					}
				})
				
				uni.request({
					url: _this.serverUrl + "renren/bookborrow/list2",
					data:{
						userId:usersId,
						bookState:0,
						
					},
					success(res) {
						_this.dataList = res.data.page.list
					}
				})
			},

		

			msgPer() {
				var a = uni.getStorageSync('usersName')
				this.usersName = a
				if (a == "" || a == null) {
					uni.navigateTo({
						url: '../login/login'
					})
					return false
				}
			}
		}
	}
</script>

<style>
	

	.aa {
		margin-top: 20upx;
		font-weight: bold;
		margin-left: 20upx;
		padding: 20upx;
		font-size: 23upx;
		border-bottom: 1upx solid #CCCCCC;
	}
</style>
